package org.spring.boot.jpa.jpa;


import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.io.Serializable;
import java.util.List;

public interface JpaMember extends
        JpaRepository<Member, Long>,
        JpaSpecificationExecutor<Member>,
        Serializable {


    @Query(value = "select * from member where id=?1",nativeQuery = true)
    List<Member> myselect(Long id);

    @Modifying
    @Query(value = "update member set nickname=?1 where id=?2",nativeQuery = true)
    void mydelete(String nickname,Long id);
}
